#include <iostream>
#include <cstdlib>
using namespace std;

int main(int argc, char * argv[])
{
  int N, i = 0, count = 0;
  cout << "kolich elementov: ";
  cin >> N;
  int * array = new int[N];
  for(int j = 0; j < N; j++)
  {
    cout << "Array[" << j << "] -> ";
    cin >> array[j];
  }
  while(i != 0)
  {
    count++;
    if (array[i] == 0)
      i = 0;
    else
      i++;
  }
  cout << "nomer : " << count << endl;
  delete[] array;
  system("PAUSE");
  return 0;
}
